/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/*
 * PrincipalAlumnoView.java
 *
 * Created on 21-may-2012, 16:29:21
 */
package educar.gui;

import educar.controllers.PrincipalAlumnoController;
import javax.swing.JButton;
import javax.swing.JFrame;

/**
 *
 * @author Flubber
 */
public class PrincipalAlumnoView extends javax.swing.JFrame {

// <editor-fold defaultstate="collapsed" desc="Constructor">      
    /** Creates new form PrincipalAlumnoView */
    public PrincipalAlumnoView() {
        initComponents();
    }
// </editor-fold>
    
@SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        jbRegistrarse = new javax.swing.JButton();
        jbResolucion = new javax.swing.JButton();

        setDefaultCloseOperation(javax.swing.WindowConstants.DO_NOTHING_ON_CLOSE);

        jbRegistrarse.setText("Registarse");

        jbResolucion.setText("Resolucion");

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jbRegistrarse, javax.swing.GroupLayout.PREFERRED_SIZE, 111, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(jbResolucion, javax.swing.GroupLayout.DEFAULT_SIZE, 102, Short.MAX_VALUE)
                .addContainerGap())
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addGap(26, 26, 26)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jbRegistrarse, javax.swing.GroupLayout.PREFERRED_SIZE, 70, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jbResolucion, javax.swing.GroupLayout.PREFERRED_SIZE, 71, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        pack();
    }// </editor-fold>//GEN-END:initComponents

// <editor-fold defaultstate="collapsed" desc="Declaracion de Variables"> 
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JButton jbRegistrarse;
    private javax.swing.JButton jbResolucion;
    // End of variables declaration//GEN-END:variables
// </editor-fold>

    
    /**
     * Boton de Registracion
     * @return jbRegistrarse
     */
    public JButton getJbRegistrarse() {
        return jbRegistrarse;
    }

    
    /**
     * Boton de Resolucion
     * @return jbResolucion
     */
    public JButton getJbResolucion() {
        return jbResolucion;
    }
 
    
    /**
     * Ventana
     * @return PrincipalAlumnoView
     */
    public JFrame getVentana(){
        return this;
    }

 
    /**
     * Asigna un Listener a los Botones
     * @param listener
     */
    public void setListenerButton(PrincipalAlumnoController listener) {
        jbRegistrarse.addActionListener(listener);
        jbResolucion.addActionListener(listener);
    }

    
    /**
     * Asigna un Listener a la Ventana
     * @param listener
     */
    public void setListenerWindow(PrincipalAlumnoController listener){
        this.addWindowListener(listener);
    }
}
